const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const cust_Handler=require('../router_handler/customer')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')

const {custsup_find,reset_schema,cust_schema,delete_schema,cust_update_schema}=require('../schema/user')

router.post('/findall',cust_Handler.customerall)
router.post('/insert',expressJoi(cust_schema),cust_Handler.insertcustomer)
router.post('/delete',expressJoi(delete_schema),cust_Handler.deletecustomer)
router.post('/update',expressJoi(cust_update_schema),cust_Handler.updatecustomer)
router.post('/reset',expressJoi(reset_schema),cust_Handler.resetcustomer)
router.post('/find',expressJoi(custsup_find),cust_Handler.customerfind)
module.exports=router


